/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn;

import cn.webrx.mapper.UserMapper;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;

/**
 * <p>Project: mybatis2021 - Demo
 * <p>Powered by webrx On 2021-07-12 11:26:37
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 15
 */
public class Demo {
    public static void main(String[] args) throws IOException {
        var is = Resources.getResourceAsStream("mybatis-conf.xml");
        var sf = new SqlSessionFactoryBuilder().build(is);
        var ss = sf.openSession(true);

        var u = ss.getMapper(UserMapper.class);
        System.out.println(u.ver());

    }
}
